package lingnan.cn.edu.view;

import java.awt.Color;
import java.awt.Label;
import java.awt.Panel;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.JButton;
import javax.swing.JLabel;

import lingnan.cn.edu.util.FontUtil;
import lingnan.cn.edu.util.ShoppingCar;

public class sumView extends Base implements ActionListener{
	Panel mainPanel;
    JButton yesButton,noButton;
    JLabel textLabel,textLabel1,textLabel2;
    int totalPrice = 0;
    int orderId = 0;
    ShoppingCar shoppingCar = MainView.getShoppingCar();
    
    
    //
    
	public sumView(){
		super(300,250,"结算界面");
		
	}

	@Override
	public void actionPerformed(ActionEvent e) {
		// TODO Auto-generated method stub
		
	}

	@Override
	protected void initView() {
		my();
		
	
		
	}
	protected void my() {
		
		
		mainPanel=new Panel();
		mainPanel.setBackground(new Color(0xEDEDED));
		mainPanel.setLayout(null);
		textLabel=new JLabel();
		textLabel1 = new JLabel();
		textLabel2 = new JLabel();
		
		textLabel.setText("结算成功！");
		textLabel1.setText("订单号为："+OrderView.id);
		System.out.println(OrderView.id);
		textLabel2.setText("订单金额为："+OrderView.tp);
		textLabel.setFont(FontUtil.menuFont1);
		textLabel.setBounds(70, -20, 200, 200);
		textLabel1.setFont(FontUtil.menuFont2);
		textLabel1.setBounds(150, 30, 200, 200);
		textLabel2.setFont(FontUtil.menuFont2);
		textLabel2.setBounds(150, 50, 200, 200);
		mainPanel.add(textLabel);
		mainPanel.add(textLabel1);
		mainPanel.add(textLabel2);
		
		
		this.add(mainPanel);
		
	}
	public static void main(String[] args) {
		try {
            for (javax.swing.UIManager.LookAndFeelInfo info : javax.swing.UIManager.getInstalledLookAndFeels()) {
                if ("Nimbus".equals(info.getName())) {
                    javax.swing.UIManager.setLookAndFeel(info.getClassName());
                    break;
                }
            }
        }catch(Exception e) {
        	System.out.println(e);
        }
	//	sumView clearView = new sumView();
		
		
	}
}
